]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st: Remove deprecated Bin properties
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 21 May 2020 03:21:47 +0000 (05:21 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 21 May 2020 12:36:59 +0000 (14:36 +0200)
Those were deprecated last cycle in favor of ClutterActor's own
expand/align properties, and don't have any effect anymore.

Time to remove them for good.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1273

src/st/st-bin.c
src/st/st-bin.h

index 861a49b577c4af2a418b2bd75ab64f4a6a2c6f74..4d7c705c3173c5bd7addb2bf49f663a202645a7d 100644 (file)
@@ -42,9 +42,6 @@ typedef struct _StBinPrivate          StBinPrivate;
 struct _StBinPrivate
 {
   ClutterActor *child;
-
-  guint         x_fill : 1;
-  guint         y_fill : 1;
 };
 
 enum
@@ -52,8 +49,6 @@ enum
   PROP_0,
 
   PROP_CHILD,
-  PROP_X_FILL,
-  PROP_Y_FILL,
 
   N_PROPS
 };
@@ -258,7 +253,6 @@ st_bin_set_property (GObject      *gobject,
                      GParamSpec   *pspec)
 {
   StBin *bin = ST_BIN (gobject);
-  StBinPrivate *priv = st_bin_get_instance_private (bin);
 
   switch (prop_id)
     {
@@ -266,18 +260,6 @@ st_bin_set_property (GObject      *gobject,
       st_bin_set_child (bin, g_value_get_object (value));
       break;
 
-    case PROP_X_FILL:
-      st_bin_set_fill (bin,
-                       g_value_get_boolean (value),
-                       priv->y_fill);
-      break;
-
-    case PROP_Y_FILL:
-      st_bin_set_fill (bin,
-                       priv->x_fill,
-                       g_value_get_boolean (value));
-      break;
-
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
     }
@@ -297,14 +279,6 @@ st_bin_get_property (GObject    *gobject,
       g_value_set_object (value, priv->child);
       break;
 
-    case PROP_X_FILL:
-      g_value_set_boolean (value, priv->x_fill);
-      break;
-
-    case PROP_Y_FILL:
-      g_value_set_boolean (value, priv->y_fill);
-      break;
-
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
     }
@@ -340,32 +314,6 @@ st_bin_class_init (StBinClass *klass)
                          CLUTTER_TYPE_ACTOR,
                          ST_PARAM_READWRITE);
 
-  /**
-   * StBin:x-fill:
-   *
-   * Whether the child should fill the horizontal allocation
-   */
-  props[PROP_X_FILL] =
-    g_param_spec_boolean ("x-fill",
-                          "X Fill",
-                          "Whether the child should fill the "
-                          "horizontal allocation",
-                          FALSE,
-                          ST_PARAM_READWRITE | G_PARAM_DEPRECATED);
-
-  /**
-   * StBin:y-fill:
-   *
-   * Whether the child should fill the vertical allocation
-   */
-  props[PROP_Y_FILL] =
-    g_param_spec_boolean ("y-fill",
-                          "Y Fill",
-                          "Whether the child should fill the "
-                          "vertical allocation",
-                          FALSE,
-                          ST_PARAM_READWRITE | G_PARAM_DEPRECATED);
-
   g_object_class_install_properties (gobject_class, N_PROPS, props);
 }
 
@@ -441,68 +389,3 @@ st_bin_get_child (StBin *bin)
 
   return ((StBinPrivate *)st_bin_get_instance_private (bin))->child;
 }
-
-/**
- * st_bin_set_fill:
- * @bin: a #StBin
- * @x_fill: %TRUE if the child should fill horizontally the @bin
- * @y_fill: %TRUE if the child should fill vertically the @bin
- *
- * Sets whether the child of @bin should fill out the horizontal
- * and/or vertical allocation of the parent
- */
-void
-st_bin_set_fill (StBin   *bin,
-                 gboolean x_fill,
-                 gboolean y_fill)
-{
-  StBinPrivate *priv;
-
-  g_return_if_fail (ST_IS_BIN (bin));
-
-  priv = st_bin_get_instance_private (bin);
-
-  g_object_freeze_notify (G_OBJECT (bin));
-
-  if (priv->x_fill != x_fill)
-    {
-      priv->x_fill = x_fill;
-
-      g_object_notify_by_pspec (G_OBJECT (bin), props[PROP_X_FILL]);
-    }
-
-  if (priv->y_fill != y_fill)
-    {
-      priv->y_fill = y_fill;
-
-      g_object_notify_by_pspec (G_OBJECT (bin), props[PROP_Y_FILL]);
-    }
-
-  g_object_thaw_notify (G_OBJECT (bin));
-}
-
-/**
- * st_bin_get_fill:
- * @bin: a #StBin
- * @x_fill: (out): return location for the horizontal fill, or %NULL
- * @y_fill: (out): return location for the vertical fill, or %NULL
- *
- * Retrieves the horizontal and vertical fill settings
- */
-void
-st_bin_get_fill (StBin    *bin,
-                 gboolean *x_fill,
-                 gboolean *y_fill)
-{
-  StBinPrivate *priv;
-
-  g_return_if_fail (ST_IS_BIN (bin));
-
-  priv = st_bin_get_instance_private (bin);
-
-  if (x_fill)
-    *x_fill = priv->x_fill;
-
-  if (y_fill)
-    *y_fill = priv->y_fill;
-}
index d4d9fa509ac71305fe6fccfb6c4847f7dd640ee9..7784f45b3d6cf5f585e32b6d809a85cbc432a79d 100644 (file)
@@ -47,12 +47,6 @@ StWidget   *  st_bin_new           (void);
 void          st_bin_set_child     (StBin        *bin,
                                     ClutterActor *child);
 ClutterActor *st_bin_get_child     (StBin        *bin);
-void          st_bin_set_fill      (StBin        *bin,
-                                    gboolean      x_fill,
-                                    gboolean      y_fill);
-void          st_bin_get_fill      (StBin        *bin,
-                                    gboolean     *x_fill,
-                                    gboolean     *y_fill);
 
 G_END_DECLS